package com.eshop.modules.cart.domain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.eshop.domain.BaseDomain;

@TableName("store_cart")
public class StoreCart extends BaseDomain
{
    @TableId
    private Long id;
    private Long uid;
    private String type;
    private Long productId;
    private String productAttrUnique;
    private Integer cartNum;
    private Integer isPay;
    //是否为立即购买
    private Integer isNew;
    private Long combinationId;
    private Long seckillId;
    private Long bargainId;
    
    public void copy(final StoreCart source) {
        BeanUtil.copyProperties((Object)source, (Object)this, CopyOptions.create().setIgnoreNullValue(true));
    }
    
    public static StoreCartBuilder builder() {
        return new StoreCartBuilder();
    }
    
    public Long getId() {
        return this.id;
    }
    
    public Long getUid() {
        return this.uid;
    }
    
    public String getType() {
        return this.type;
    }
    
    public Long getProductId() {
        return this.productId;
    }
    
    public String getProductAttrUnique() {
        return this.productAttrUnique;
    }
    
    public Integer getCartNum() {
        return this.cartNum;
    }
    
    public Integer getIsPay() {
        return this.isPay;
    }
    
    public Integer getIsNew() {
        return this.isNew;
    }
    
    public Long getCombinationId() {
        return this.combinationId;
    }
    
    public Long getSeckillId() {
        return this.seckillId;
    }
    
    public Long getBargainId() {
        return this.bargainId;
    }
    
    public void setId(final Long id) {
        this.id = id;
    }
    
    public void setUid(final Long uid) {
        this.uid = uid;
    }
    
    public void setType(final String type) {
        this.type = type;
    }
    
    public void setProductId(final Long productId) {
        this.productId = productId;
    }
    
    public void setProductAttrUnique(final String productAttrUnique) {
        this.productAttrUnique = productAttrUnique;
    }
    
    public void setCartNum(final Integer cartNum) {
        this.cartNum = cartNum;
    }
    
    public void setIsPay(final Integer isPay) {
        this.isPay = isPay;
    }
    
    public void setIsNew(final Integer isNew) {
        this.isNew = isNew;
    }
    
    public void setCombinationId(final Long combinationId) {
        this.combinationId = combinationId;
    }
    
    public void setSeckillId(final Long seckillId) {
        this.seckillId = seckillId;
    }
    
    public void setBargainId(final Long bargainId) {
        this.bargainId = bargainId;
    }
    
    public StoreCart(final Long id, final Long uid, final String type, final Long productId, final String productAttrUnique, final Integer cartNum, final Integer isPay, final Integer isNew, final Long combinationId, final Long seckillId, final Long bargainId) {
        this.id = id;
        this.uid = uid;
        this.type = type;
        this.productId = productId;
        this.productAttrUnique = productAttrUnique;
        this.cartNum = cartNum;
        this.isPay = isPay;
        this.isNew = isNew;
        this.combinationId = combinationId;
        this.seckillId = seckillId;
        this.bargainId = bargainId;
    }
    
    public StoreCart() {
    }
    
    public static class StoreCartBuilder
    {
        private Long id;
        private Long uid;
        private String type;
        private Long productId;
        private String productAttrUnique;
        private Integer cartNum;
        private Integer isPay;
        private Integer isNew;
        private Long combinationId;
        private Long seckillId;
        private Long bargainId;
        
        StoreCartBuilder() {
        }
        
        public StoreCartBuilder id(final Long id) {
            this.id = id;
            return this;
        }
        
        public StoreCartBuilder uid(final Long uid) {
            this.uid = uid;
            return this;
        }
        
        public StoreCartBuilder type(final String type) {
            this.type = type;
            return this;
        }
        
        public StoreCartBuilder productId(final Long productId) {
            this.productId = productId;
            return this;
        }
        
        public StoreCartBuilder productAttrUnique(final String productAttrUnique) {
            this.productAttrUnique = productAttrUnique;
            return this;
        }
        
        public StoreCartBuilder cartNum(final Integer cartNum) {
            this.cartNum = cartNum;
            return this;
        }
        
        public StoreCartBuilder isPay(final Integer isPay) {
            this.isPay = isPay;
            return this;
        }
        
        public StoreCartBuilder isNew(final Integer isNew) {
            this.isNew = isNew;
            return this;
        }
        
        public StoreCartBuilder combinationId(final Long combinationId) {
            this.combinationId = combinationId;
            return this;
        }
        
        public StoreCartBuilder seckillId(final Long seckillId) {
            this.seckillId = seckillId;
            return this;
        }
        
        public StoreCartBuilder bargainId(final Long bargainId) {
            this.bargainId = bargainId;
            return this;
        }
        
        public StoreCart build() {
            return new StoreCart(this.id, this.uid, this.type, this.productId, this.productAttrUnique, this.cartNum, this.isPay, this.isNew, this.combinationId, this.seckillId, this.bargainId);
        }
        
        @Override
        public String toString() {
            return "StoreCart.StoreCartBuilder(id=" + this.id + ", uid=" + this.uid + ", type=" + this.type + ", productId=" + this.productId + ", productAttrUnique=" + this.productAttrUnique + ", cartNum=" + this.cartNum + ", isPay=" + this.isPay + ", isNew=" + this.isNew + ", combinationId=" + this.combinationId + ", seckillId=" + this.seckillId + ", bargainId=" + this.bargainId + ")";
        }
    }
}
